<template>
  <el-dialog :visible="isPop" title="考勤扣款导入" @close="onClose">
    <div class="row">
      <el-upload :action="action" :auto-upload="false" :accept="accept" :on-change="onChange" class="upload" :file-list="fileList" ref="upload" :http-request="uploadSectionFile">
        <el-input placeholder="请选择导入的文件!" disabled></el-input>
        <el-button size="small">浏览文档</el-button>
      </el-upload>
      <el-link type="primary" @click="onClickDown">下载考勤扣款导入模板</el-link>
    </div>
    <div class="hint">
      <p>1. 请使用标准模板进行导入，完善考勤扣款数据即可，方便不易出错</p>
      <p>2. 请注意文件导入要求</p>
      <p>1）不支持复合表头</p>
      <p>2）只能导入系统中已有员工的考勤扣款数据</p>
      <p>3）考勤扣款项目需要和表中设置的保持一致，不能删除与更改，否则不能识别</p>
      <p>4）重名员工，请填写工号，否则不能识别</p>
    </div>
    <template #footer>
      <el-button @click="onClose">取消</el-button>
      <el-button type="primary" @click="onImport" :loading="loading || operationLoading.WagesImport">导入</el-button>
    </template>
  </el-dialog>
</template>
<script>
import { importMixins } from "./mixins/import";
export default {
  name: "importClockingPop",
  mixins: [importMixins],
  data() {
    return {};
  },
  methods: {
    onClickDown(e) {
      console.log(e);
      this.executeDown();
    }
  }
};
</script>
<style lang="less" scoped>
@import url("./style/import.less");
</style>
